﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login_parameter.aspx.cs" Inherits="YXShop.Web.admin.templates.label.login_parameter" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <link href="../../style/admin.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript">
function ReturnValue()
{      
   //自定义内容
    var oEditor = FCKeditorAPI.GetInstance("fckLabelContent");//读fck内容
    var mystyle = oEditor.GetXHTML(true);
     if(mystyle.indexOf("[#login_name]")<=-1 || mystyle.indexOf("[#login_pass]")<=-1 || mystyle.indexOf("[#login_button]")<=-1){
	       alert("添加会员登陆表单必须有固定样式");
	       return;
	    }  
	var cnm ="[YX:unLoop,YX:LableType=MemberLogin,YX:Option=LoginForm]"+mystyle+"[/YX:unLoop]";	 
    parent.getValue(cnm);
	CloseDiv();

}

function getValue(value)
{
    if(value!="") 
    {
        var oEditor = FCKeditorAPI.GetInstance("fckLabelContent");
        if (oEditor.EditMode==FCK_EDITMODE_WYSIWYG)
        {
           oEditor.InsertHtml(""+value+"");
        }
        
        else
        {
        return false;
        }
    }
}
function CloseDiv()
{
    parent.document.getElementById("LabelDivid").style.display="none";
}

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      
       <table style="width: 100%;" class="form_table_input" >
        <tr>
            <td>可选样式</td>
            <td>
             <asp:DropDownList ID="ddlComment" runat="server" onchange="javascript:getValue(this.value);">
             <asp:ListItem Value="" Text="-请选择样式-" />                 
                    <asp:ListItem Value="[#login_validate]" Text="登陆验证码" />
                    <asp:ListItem Value="[#login_image]" Text="会员登陆图片" />
                    <asp:ListItem Value="[#login_enrol]" Text="注册页超连接"/>
            </asp:DropDownList>
            </td>           
            <td>固定样式</td>
            <td>
                <asp:DropDownList ID="ddlNeed" runat="server" onchange="javascript:getValue(this.value);"> 
                    <asp:ListItem Value="" Text="-请选择样式-" />                                  
                    <asp:ListItem Value="[#login_name]" Text="登陆名" />
                    <asp:ListItem Value="[#login_pass]" Text="登陆密码" />
                    <asp:ListItem Value="[#login_button]" Text="登陆按扭" />
                </asp:DropDownList><span style="color:Red">注：该样式是前台会员登陆信息显示的主要样式(必选项)</span>
            </td>
       </tr>
       
        <tr>
            <td colspan="4">
                <FCKeditorV2:FCKeditor ID="fckLabelContent" runat="server"  BasePath="~/controls/fckeditor/"  Height="200px">
                </FCKeditorV2:FCKeditor>
            </td>
        </tr>
       
        <tr>
            <td colspan="4" align="center" style="text-align:center">
                <input id="btnSubmit" type="button" value="提交" onclick="ReturnValue()" />&nbsp;
                <input type="button" value=" 关闭 "  onclick="javascript:CloseDiv();" />
            </td>
        </tr>
     </table>
      
    </div>
    </form>
</body>
</html>
